﻿using System;
using System.Collections.Generic;
using System.Text;
using System.IO;

namespace HttpAssiant
{
    class Log
    {
        public static void PrintLog(string log)
        {
            log = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss:ffffff") + ":" + log + "\r\n";
            try
            {
                using (FileStream fileStream = new FileStream("log.log", FileMode.Append))
                {
                    StreamWriter writer = new StreamWriter(fileStream);
                    writer.Write(log);
                    writer.Flush();
                    writer.Close();
                    fileStream.Close();
                }
            }
            catch (Exception ex)
            {
                //throw ex;
            }
        }
    }
}
